<template>
  <div class="container">
    <image-preview :urls="urls"></image-preview>
    <button @click="openPreview">查看图片</button>
  </div>
</template>
<script>
import imagePreview from "@/components/imagePreview/imagePreview";

export default {
  name: "index",
  components: {imagePreview},
  data() {
    return {
      urls: []
    }
  },
  mounted() {
  },
  methods: {
    openPreview() {
      this.urls = null;
      // http://www.ming2228.com/upload/2021-02-05/225at1612493435943.png
      this.urls =new Array(1000).fill("http://www.ming2228.com/upload/2021-02-05/225at1612493435943.png")
    }
  }
}
</script>

<style lang="css" scoped>
.container {
  width: 100vw;
  height: 100vh;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
}

.canvas {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
}
</style>